package cz.semjob.document.annotation.reader;

import java.util.Comparator;

public class AnnotationLineStringComparator implements Comparator<String> {

	public int compare(String o1, String o2) {
		if (o1.length()== 0 || o1.startsWith("*")) {
			return 1;
		}
		if (o2.length() == 0 || o2.startsWith("*")) {
			return -1;
		}
		int num1 = Integer.parseInt(o1.substring(1, o1.indexOf("\t") ));
	    int num2 = Integer.parseInt(o2.substring(1, o2.indexOf("\t") ));
	    return num1 - num2;
	}

}
